/**
 * Copyright (C) 2013-2014 the original author or authors.
 */
package com.foreveross.bsl.mdm.ios.application;

import java.util.List;

import javax.ws.rs.DELETE;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.PUT;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import com.foreveross.bsl.mdm.ios.application.vo.MdmEnrollmentVo;

/**
 * @description
 *
 * @author heyaowen
 * @version v1.0
 *
 * @2014-7-18
 *
 */
@Path(value = "/iosEnrollment")
public interface MdmEnrollApplication {

	@POST
	@Path("/")
	@Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
	public MdmEnrollmentVo saveEntity(MdmEnrollmentVo entity);

	@PUT
	@Path("/{id}")
	@Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
	public MdmEnrollmentVo updateEntity(@PathParam("id") String id, MdmEnrollmentVo entity);

	@DELETE
	@Path("/{id}")
	public void deleteEntity(@PathParam("id") String id);
	
	@GET
	@Path("/{id}")
	@Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
	public MdmEnrollmentVo getEntity(@PathParam("id") String id);
	
	@GET
	@Path("/field/{topic}")
	@Produces({MediaType.APPLICATION_XML,MediaType.APPLICATION_JSON})
	public List<MdmEnrollmentVo> getEntityByTopic(@PathParam("topic") String topic);
	
	@GET
	@Path("/udid/{udid}")
	@Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
	public MdmEnrollmentVo getEntityByUdid(@PathParam("udid") String udid);
	
	@GET
	@Path("/apnsToken/{apnsToken}")
	@Produces({MediaType.APPLICATION_XML,MediaType.APPLICATION_JSON})
	public MdmEnrollmentVo getEntityByApnsToken(@PathParam("apnsToken") String apnsToken);

	@GET
	@Path("/")
	@Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
	public List<MdmEnrollmentVo> findAll();

	@POST
	@Path("/pages")
	@Produces({MediaType.APPLICATION_XML,MediaType.APPLICATION_JSON})
	public Page<MdmEnrollmentVo> findByPageable(Pageable pageable);
	
	@POST
	@Path("/parampages")
	@Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
	public Page<MdmEnrollmentVo> findByPageable(Pageable pageable, MdmEnrollmentVo account);
}
